﻿@using KPIS.GERP.Models.ICM
@using KPIS.GERP.Models.FIM
@model MasContactBank
 
@if (ViewContext.RouteData.Values["action"].ToString().ToLower() == "editbank")
{
@Html.HiddenFor(model => model.ConBankId)
}
@Html.HiddenFor(model => model.ConId)
@Html.HiddenFor(model => model.RecordStatus)
@Html.HiddenFor(model => model.CreatedBy)
@Html.HiddenFor(model => model.CreatedWhen)
@Html.HiddenFor(model => model.UpdatedBy)
@Html.HiddenFor(model => model.UpdatedWhen)

@{
    var MasBankService = new KPIS.GERP.WEB.GIMS.MasBankService.MasBankServiceClient();
    
    var newList = new List<SelectListItem>();
    var newItem = new SelectListItem() { Value = "", Text = "" };
    newList.Add(newItem);
}

<div class="widget-box">
	<div class="widget-header header-color-blue2">
        <h4 class="lighter smaller">ข้อมูลหลัก</h4>
    </div>
    <div class="widget-body">
        <div class="widget-body-inner">
			<div class="widget-main">
                <div class="control-group">
                    <div class="control-label">
                        ธนาคาร
                    </div>
                    <div class="controls">
                        @Html.DropDownListFor(model => model.MasBankBranch.BankId, MasBankService.SelectListBank(new MasBank() { RecordStatus = "!D" })
                        , new { id="ddlBank", @class = "chzn-select" })
                        @Html.ValidationMessageFor(model => model.MasBankBranch.BankId)
                    </div>            
                </div>
                <div class="control-group">
                    <div class="control-label">
                        สาขา
                    </div>
                    <div class="controls">
                        @Html.DropDownListFor(model => model.BranchId, newList
                        , new { id="ddlBankBranch", @class="chzn-select" })
                        @Html.ValidationMessageFor(model => model.BranchId)
                    </div>            
                </div>
                <div class="control-group">
                    <div class="control-label">
                        เลขบัญชีเงินฝากธนาคาร
                    </div>
                    <div class="controls">
                        @Html.EditorFor(model => model.AccountCode)
                        @Html.ValidationMessageFor(model => model.AccountCode)
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        ชื่อบัญชีเงินฝากธนาคาร
                    </div>
                    <div class="controls">
                        @Html.EditorFor(model => model.AccountName)
                        @Html.ValidationMessageFor(model => model.AccountName)
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
